package com.chj.design.observer;

import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class EventListener {

    @Subscribe //加了订阅，这里标记这个方法是事件处理方法
    public void handle(NotifyEvent notifyEvent) {
        log.info("发送IM消息" + notifyEvent.getImNo());
        log.info("发送短信消息" + notifyEvent.getMobileNo());
        log.info("发送Email消息" + notifyEvent.getEmailNo());
    }
}
